<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="com.google.appengine.api.users.User"%>
<%@ page import="com.google.appengine.api.users.UserService"%>
<%@ page import="com.google.appengine.api.users.UserServiceFactory"%>

<html>
<head>
<style type="text/css">
table tr td {
	padding: 0 10px;
}
.title {
	font-size: 16px;
	color: black;
	text-align: right;
}

.subtitle {
	text-align: right;
	font-size: 12px;
	color: #999999
}
</style>
</head>
<body>

	<%
		UserService userService = UserServiceFactory.getUserService();
		User user = userService.getCurrentUser();
		if (user != null
				&& (user.getEmail().equals("moazzam.cricket@gmail.com") || user
						.getEmail().equals("deepakdub@gmail.com"))) {
	%>
	<p>
		Hello,
		<%=user.getNickname()%>! (You can add video lecture data, or else <a
			href="<%=userService.createLogoutURL(request.getRequestURI())%>">sign
			out</a>.)
	</p>
	<form action="ml" method="post">
		<table>
			<tr>
				<td><div class="title">Video Id</div>
					<div class="subtitle">Generated by youtube</div></td>
				<td><input name="id" type="text"></td>
			</tr>
			<tr>
				<td><div class="title">Transcript</div>
					<div class="subtitle">Add transcript for the video</div></td>
				<td><textarea name="transcript"></textarea></td>
			</tr>
		</table>
		<input type="submit">
	</form>

	<%
		} else {
	%>
	<p>
		Hello! <a
			href="<%=userService.createLoginURL(request.getRequestURI())%>">Sign
			in</a> to Edit, else you are not authorize.
	</p>
	<%
		}
	%>

</body>
</html>